<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
	<div class="header_phai">Sản phẩm mới</div>
		<div class="boxstyle">
			<table width="100%" border="0" cellspacing="0" cellpadding="1">
				<tr>
				<?php
					$query="select * from productdetails where state='on' ORDER BY id DESC";
					$result=mysql_query($query);
					$a=1;
					while($row=mysql_fetch_array($result)){?>
					<td><div class="sanpham_anh_moi" align="center" style="padding:5px;">
					<a href="index.php?page=listviewproductDetail&id=<?php echo $row['id'];?>" ><img src="<?php echo substr($row['imgpath'],3);?>" width="80" height="53"/></a>
					</div></td>

					<td class="sanphammoi_ten"><a href="index.php?page=listviewproductDetail&id=<?php echo $row['id'];?>" ><?php echo $row['productname'];?></a></td>
					
				</tr>
				<tr>
					<td colspan="2" style="line-height:1px;border-bottom:1px dashed #999"></td>
				</tr>
				<?php
					if($a%1==0){
						echo "<tr></tr>";	
					}
					$a=$a+1;
				   }
					?>
			</table>
		</div>
</body>
</html>
